import { createRouter, createWebHistory } from 'vue-router'


//1、 构建路由的元配置 （path: url name: vue文件名字  component vue文件路径）
const routes = [
    {
        path: '/',
        name: 'dhome',
        component: () => import('../views/Dhome.vue'),
        meta:{title:'首页'}
    },
    {
        path: '/qyhome',
        name: 'qyhome',
        component: () => import('../views/Qyhome.vue'),
        meta: { title: '企业项目' }
    },
    {
        path: '/login',
        name: 'login',
        component: () => import('../views/Login.vue'),
        meta: { title: '登录' }
    }, {
        path: '/fwdemo',
        name: 'fwdemo',
        component: () => import('../views/Fwdemo.vue'),
        meta: { title: '服务流程' }
    },
    {
        path: '/Ptfc',
        name: 'ptfc',
        component: () => import('../views/PtFc.vue'),
        meta: { title: '平台风采' }
    }, {
        path: '/myxd',
        name: 'myxd',
        component: () => import('../views/Myxd.vue'),
        meta: { title: '我的小滴' }
    },
]


//2、 构建路由实例对象
const router = createRouter({
    //定义路由模式
    history: createWebHistory(),
    routes
})

//3、把路由导出 目的是让整个项目使用
export default router


